/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidad;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author pepe
 */
@Entity
@Table(name = "emisora", catalog = "SBDB", schema = "")
@NamedQueries({
    @NamedQuery(name = "Emisora.findAll", query = "SELECT e FROM Emisora e")})
public class Emisora implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idEmisora")
    private Integer idEmisora;
    @Column(name = "ciudad")
    private String ciudad;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "dial",unique=true)
    private Float dial;
    @Column(name = "nombre")
    private String nombre;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "emisora")
    private List<Registromonitoreoaudio> registromonitoreoaudioList;

    public Emisora() {
    }

    public Emisora(Integer idEmisora) {
        this.idEmisora = idEmisora;
    }

    public Integer getIdEmisora() {
        return idEmisora;
    }

    public void setIdEmisora(Integer idEmisora) {
        this.idEmisora = idEmisora;
    }

    public String getCiudad() {
        return ciudad;
    }

    public void setCiudad(String ciudad) {
        this.ciudad = ciudad;
    }

    public Float getDial() {
        return dial;
    }

    public void setDial(Float dial) {
        this.dial = dial;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public List<Registromonitoreoaudio> getRegistromonitoreoaudioList() {
        return registromonitoreoaudioList;
    }

    public void setRegistromonitoreoaudioList(List<Registromonitoreoaudio> registromonitoreoaudioList) {
        this.registromonitoreoaudioList = registromonitoreoaudioList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEmisora != null ? idEmisora.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Emisora)) {
            return false;
        }
        Emisora other = (Emisora) object;
        if ((this.idEmisora == null && other.idEmisora != null) || (this.idEmisora != null && !this.idEmisora.equals(other.idEmisora))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidad.Emisora[ idEmisora=" + idEmisora + " ]";
    }
    
}
